home *** CD-ROM | disk | FTP | other *** search
- .KEY RXCMD/A,tdir/A,SFILE/A,PFILE/A
- .BRA {
- .KET }
-
- If Exists ENV:installer-result
- Delete ENV:installer-result Quiet Force
- EndIf
-
- set sum=`bin/tmd5sum "{SFILE}"`
-
- FailAt 11
- {RXCMD} bin/patchfiles $sum patch/{PFILE} >"ENV:installer-result"
-
- If ERROR
- unset sum
- Quit 10
- endif
- unset sum
-
- set patches=`Type ENV:installer-result`
- Delete ENV:installer-result Quiet Force
- ;Echo RXOUT $patches
-
- if "$patches" EQ "NOMATCH"
- Echo "Patch files not found !!!!" >"ENV:installer-result"
- unset patches
- Quit 11
- endif
-
- if "$patches" EQ "PATCHED"
- Echo {SFILE} "Already patched" >"ENV:installer-result"
- unset patches
- Quit 5
- endif
-
- If Exists {tdir}NSDi_patched
- Delete {tdir}NSDi_patched Quiet Force
- endif
- Copy "{SFILE}" {tdir}NSDi_patched
-
- Lab Loop
-
- set patchfile=`{RXCMD} "Say DelWord('$patches', 2)"`
- ;Echo PATCHFILE $patchfile
-
- set patches="`{RXCMD} "Say DelWord('$patches', 1, 1)"`"
- ;Echo PATCHES $patches
-
- If "$patches" EQ ""
- ; set sum=`bin/tmd5sum {tdir}NSDi_patched`
- ; If $sum NOT EQ $patchfile
- ; Echo "Incorrect result file" >"ENV:installer-result"
- ; unset patches
- ; unset patchfiles
- ; Quit 5
- ; EndIf
- Skip loppu
- EndIf
-
- bin/spatch -o{tdir}NSDi_patching -ppatch/$patchfile {tdir}NSDi_patched
- Delete {tdir}NSDi_patched force quiet
- Rename {tdir}NSDi_patching {tdir}NSDi_patched
-
- Skip BACK loop
- Lab loppu
-
- unset patches
- unset patchfile
-